# 借鉴kumar2020.pdf
library(haven)
gender = c(rep(1,10),rep(2,10),rep(1,8),rep(2,12),rep(1,12),rep(2,13))
sample_sizes = c(20,20,25)
group = rep(c(1,2,3),times=sample_sizes)
group_label = c("自锁托槽联合振动组","传统托槽联合振动组","对照组")
group = factor(group,labels=group_label)
age = round(c(
  rnorm(sample_sizes[1],17,0.8),
  rnorm(sample_sizes[2],17.4,0.72),
  rnorm(sample_sizes[3],16.9,1.1)
),2)
maxillar_right = round(
  c(
    rnorm(sample_sizes[1],5,0.59),
    rnorm(sample_sizes[2],5.03,0.59),
    rnorm(sample_sizes[3],5.07,0.49)
  ),2
)
maxillar_left = round(
  c(
    rnorm(sample_sizes[1],5.06,0.60),
    rnorm(sample_sizes[2],5.04,0.43),
    rnorm(sample_sizes[3],5.01,0.39)
  ),2
)

df = data.frame(
  group=group,
  age=age,
  gender=gender,
  maxillar_right=maxillar_right,
  maxillar_left=maxillar_left
)
write_sav(df,"data/c02_exe_01.sav")